package com.ziyun.pop.modules.storeMaterials.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ziyun.pop.modules.storeMaterials.entity.StoreMaterialOutDetailEntity;
import com.ziyun.pop.modules.storeMaterials.entity.StorematerialinOutEntity;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Author ZhaoWei
 * @Date 2018/10/11 13:56
 * @Version V1.0
 */
public interface StoreMaterialOutDetailDao extends BaseMapper<StoreMaterialOutDetailEntity> {


	void saveBatch(@Param("list") List<StoreMaterialOutDetailEntity> list,@Param("storematerialinOutEntity") StorematerialinOutEntity storematerialinOutEntity);


	List<StoreMaterialOutDetailEntity> getListstoreMaterialOutDetail(@Param("outId") Integer outId,@Param("outNO") String outNO);


	@Select(" select material_quantity from store_material_out_detail where material_id = #{materialId} and out_no = #{outNo} ")
	BigDecimal getMaterialQuantityByMaterialId(@Param("materialId") String materialId, @Param("outNo") String outNo);

}
